@import "@tencent/micro-frontend-shared/style/color.scss";

.search {
  box-shadow: none;
  border-top: 1px solid $grey-2;
  border-bottom: 1px solid $grey-2;
  margin-top: 10px;
}

.pkg-wrapper {
  white-space: normal;
  margin: 24px 0px;

  .custom-package {
    background-color: aliceblue;
  }

  .package {
    padding: 20px 20px 0 20px;
    border: 1px solid #e6e9ed;
    border-radius: 2px;
    box-shadow: 0px 6px 12px 0px rgba(197, 206, 219, 0.1);
    transition: all 0.3s;

    &:hover {
      box-shadow: 0px 6px 12px 0px rgba(197, 206, 219, 0.3);
    }

    .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;

      .name {
        font-size: 16px;
        font-weight: 600;
        padding-right: 8px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
    }

    .label-wrapper {
      height: 22px;
      margin-bottom: 20px;
    }

    .label {
      padding: 2px 8px;
      margin-right: 8px;
      font-size: 12px;
      color: #0f4799;
      background-color: rgba(15, 71, 153, 0.08);
      border-radius: 2px;

      &.build {
        color: $red-8;
        background-color: rgba($color: $red-8, $alpha: 0.07);
      }
    }

    .common {
      display: flex;
      align-items: center;
      margin-bottom: 20px;
      height: 44px;

      .icon {
        flex: 0 0 32px;
        font-size: 16px;
      }

      .paragraph {
        margin-bottom: 0;
      }
    }

    .languages {
      color: $grey-7;
      max-width: 212px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .footer {
      text-align: right;
      padding: 12px 0;
      border-top: 1px solid $grey-2;
    }
  }
}

.package-rules {
  padding: 30px;

  .header {
    display: flex;

    .backIcon {
      width: 28px;
      height: 28px;
      color: $blue-5;
      margin-right: 20px;
      text-align: center;
      background: #fff;
      border-radius: 50%;
      box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
      cursor: pointer;
      transition: all 0.3s;

      svg {
        font-size: 18px;
        vertical-align: middle !important;
      }

      &:hover {
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
      }
    }
  }

  .title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
  }

  .desc {
    color: $grey-7;
    margin-bottom: 20px;
  }

  .rules {
    position: relative;
  }

  .operation {
    position: absolute;
    left: 58px;
    font-size: 12px;
    width: calc(100% - 48px);
    height: 30px;
    line-height: 48px;
    background: #fff;
    z-index: 1;
  }

  .rule-table {
    .disabledRule {
      color: #919daf;
    }

    .rule-name {
      cursor: pointer;

      &:hover {
        color: $blue-5;
      }
    }

    .error-tip {
      color: $red-5;
    }

    .rule-desc {
      max-width: 320px;
      text-overflow: ellipsis;
      overflow: hidden;
      white-space: nowrap;
      // padding-right: 20px;
    }

    .build-tag {
      color: $red-8;
      background-color: rgba($color: $red-8, $alpha: 0.07);
    }
  }
}

.select-filter {
  min-width: 200px;
}
